package com.neusoft.mapper;

import com.neusoft.po.Business;
import com.neusoft.po.BusinessAdmin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface BusinessMapper {
    @Select("select * from business where orderTypeId=#{orderTypeId} order by businessId")
    public List<Business> listBusinessByOrderTypeId(Integer orderTypeId);

    @Select("select * from business where businessId=#{businessId}")
    public Business getBusinessById(Integer businessId);

    // 保存商家信息
    @Insert("INSERT INTO business VALUES (#{businessId}, #{businessName}, '默认地址', " +
            "'默认介绍', '', '1','15.00', '3.00','')")
    int saveBusiness(Business business);
}